#pragma once

// Dependencies
#include "Widget.h"
#include <functional>
#include <string>

namespace Gui {
	class Button : public Widget {
	public:
		Button();
		Button( const Core::Rect2f& rect, std::function<void()> fn, const Core::Color4& bgColor, const Core::Color4& fgColor, const Core::Color4& pressedColor, const std::string& caption );

	public:
		bool onMouseDown( const Core::Point2f& pt );
		bool onMouseUp( const Core::Point2f& pt );
		void render();
		
	public: // Members
		std::function<void()> onClick;
		std::string caption;
		Core::Color4 textColor;
		Core::Color4 pressedColor;
		bool pressed;
	};
}